{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <link rel="stylesheet" href="{% static 'bootstrap-3.3.7-dist/css/bootstrap.min.css' %}">
    <style>
        .t1{
            {#margin: 15px 0;#}
            {#padding: 0 0;#}
        }
    </style>
</head>
<body>

<div class="container-fluid">
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <h3 class="text-center">注册用户</h3>
            <form action="{% url 'register' %}" method="post" class="form-horizontal" novalidate>
            {% for field in form %}
                <div class="form-group {% if field.errors %} has-error {% endif %}">
                        <label for="{{ field.id_for_label }}" class="col-md-3  control-label">{{ field.label }}</label>
                    <div class="col-md-9 t1">
                        {{ field }}
                        <span class="text-danger">{{ field.errors.0 }}</span>
                    </div>

                </div>
            {% endfor %}
            {% csrf_token %}
                <div>
                    <input type="submit" value="注册" class="btn btn-success pull-right">
                </div>
            </form>
        </div>
    </div>
</div>

<script src="{% static 'js/jquery-3.4.1.js' %}"></script>
<script src="{% static 'js/jquery.cookie.js' %}"></script>
<script src="{% static 'bootstrap-3.3.7-dist/js/bootstrap.min.js' %}"></script>
<script>

</script>
</body>
</html>